-- GENERATED SPELL FOR [Winterskorn Scout] --


function spell0_24116(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15496,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24116', 628, 1)
end

function spell1_24116(pUnit, Event) --@Demoralizing Shout,Self--
pUnit:FullCastSpellOnTarget(13730,pUnit)
pUnit:RegisterEvent('Sorts_24116', 30265, 1)
end

function spell2_24116(pUnit, Event) --@Knockdown,n/a--
pUnit:FullCastSpellOnTarget(18812,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24116', 2000, 1)
end

function Sorts_24116(pUnit, Event)
local choix_sorts_24116 = math.random(0, 2)
if choix_sorts_24116 == 0 then
pUnit:RegisterEvent('spell0_24116', 1, 1)
end
if choix_sorts_24116 == 1 then
pUnit:RegisterEvent('spell1_24116', 1, 1)
end
if choix_sorts_24116 == 2 then
pUnit:RegisterEvent('spell2_24116', 1, 1)
end
end

function mob24116_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24116', math.random(1500, 3000), 1)
end

function mob24116_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24116_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24116_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24116, 1, 'mob24116_Action')
RegisterUnitEvent(24116, 2, 'mob24116_Leave')
RegisterUnitEvent(24116, 3, 'mob24116_Kill')
RegisterUnitEvent(24116, 4, 'mob24116_Die')
